from django import forms
from django.contrib.auth.models import User
from app.models import PatientProfile, Doctor, Staff, UserProfile
from django.contrib.auth.forms import UserCreationForm

class UserForm(forms.ModelForm):
    password = forms.CharField(widget=forms.PasswordInput())

    class Meta:
        model = User
        fields = ('username', 'password', 'first_name', 'last_name')

class UserProfileForm(forms.ModelForm):
    class Meta:
        model = UserProfile
        fields = ('mobile_phone', 'home_phone', 'address1', 'address2', 'city', 'state', 'postal_code', 'dob','gender')
        # removing first name, last name, email since they are in the user, can be added back as needed
        #fields = ('first_name', 'last_name', 'email', 'mobile_phone', 'home_phone', 'address1', 'address2', 'city', 'state', 'postal_code', 'dob','gender')

class PatientProfileForm(forms.ModelForm):
    class Meta:
        model = PatientProfile
        fields = ()

class StaffForm(forms.ModelForm):
    class Meta:
        model = Staff
        fields = ()

class DoctorForm(forms.ModelForm):
    class Meta:
        model = Doctor
        fields = ()